
package uestc.bitman.edxapp.utest;

import uestc.bitman.edxapp.EdxStudentUser;
import uestc.bitman.edxapp.courselist.Course;

import android.test.AndroidTestCase;
import android.util.Log;

import java.util.List;

public class MyTestCase extends AndroidTestCase {

    public void testUser() {
        EdxStudentUser user = new EdxStudentUser("youhackeris@gmail.com", "hackeris");
        if (user.login(null)) {
            Log.d("test case", "login success");
        }
        List<Course> courses = user.getCourses();

        for (Course course : courses) {
            Log.d(course.getDisplayName(), course.getCourseId());
            user.changeEnrollment(course.getCourseId(), "enroll");
        }
    }
}
